package com.ruoyi.carService.service.impl;

import java.util.List;

import com.ruoyi.system.api.domain.OrdersCountDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.carService.mapper.CarOrdersCountMapper;
import com.ruoyi.system.api.domain.CarOrdersCount;
import com.ruoyi.carService.service.ICarOrdersCountService;

/**
 * 订单统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-09
 */
@Service
public class CarOrdersCountServiceImpl implements ICarOrdersCountService 
{
    @Autowired
    private CarOrdersCountMapper carOrdersCountMapper;

    /**
     * 查询订单统计
     * 
     * @param ordId 订单统计主键
     * @return 订单统计
     */
    @Override
    public CarOrdersCount selectCarOrdersCountByOrdId(Long ordId)
    {
        return carOrdersCountMapper.selectCarOrdersCountByOrdId(ordId);
    }

    /**
     * 查询订单统计列表
     * 
     * @param carOrdersCount 订单统计
     * @return 订单统计
     */
    @Override
    public List<OrdersCountDto> selectCarOrdersCountList(CarOrdersCount carOrdersCount)
    {
        return carOrdersCountMapper.selectCarOrdersCountList(carOrdersCount);
    }

    /**
     * 新增订单统计
     * 
     * @param carOrdersCount 订单统计
     * @return 结果
     */
    @Override
    public int insertCarOrdersCount(CarOrdersCount carOrdersCount)
    {
        return carOrdersCountMapper.insertCarOrdersCount(carOrdersCount);
    }

    /**
     * 修改订单统计
     * 
     * @param carOrdersCount 订单统计
     * @return 结果
     */
    @Override
    public int updateCarOrdersCount(CarOrdersCount carOrdersCount)
    {
        return carOrdersCountMapper.updateCarOrdersCount(carOrdersCount);
    }

    /**
     * 批量删除订单统计
     * 
     * @param ordIds 需要删除的订单统计主键
     * @return 结果
     */
    @Override
    public int deleteCarOrdersCountByOrdIds(Long[] ordIds)
    {
        return carOrdersCountMapper.deleteCarOrdersCountByOrdIds(ordIds);
    }

    /**
     * 删除订单统计信息
     * 
     * @param ordId 订单统计主键
     * @return 结果
     */
    @Override
    public int deleteCarOrdersCountByOrdId(Long ordId)
    {
        return carOrdersCountMapper.deleteCarOrdersCountByOrdId(ordId);
    }
}
